<!-- templates/base.html -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}{% endblock %}</title>
    <link href="/static/bootstrap.min.css" rel="stylesheet">
    <link href="/static/style.css?1=5" rel="stylesheet"> <!-- 引入自定义样式 -->
    {% block additional_css %}{% endblock %} <!-- 允许子模板添加额外的 CSS -->
</head>
<body>
<!-- 导航栏 -->
<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="#">基于文档智能和百炼平台的RAG应用</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
        <ul class="navbar-nav">
            <li class="nav-item {{ 'active' if request.url.path == '/' else '' }}">
                <a class="nav-link" href="/">文档上传</a>
            </li>
            <li class="nav-item {{ 'active' if request.url.path == '/qa' else '' }}">
                <a class="nav-link" href="/qa">问答服务</a>
            </li>
        </ul>
        <ul class="navbar-nav ml-auto">
<!--            &lt;!&ndash; 用户登录后显示用户名和注销按钮 &ndash;&gt;-->
<!--            {% if user %}-->
<!--            <li class="nav-item">-->
<!--                <span class="navbar-text mr-2">欢迎，{{ user }}</span>-->
<!--            </li>-->
<!--            <li class="nav-item">-->
<!--                <a class="nav-link" href="/logout">注销</a>-->
<!--            </li>-->
<!--            {% endif %}-->
        </ul>
    </div>
</nav>
<!-- 页面内容 -->
<div class="container mt-5">
    {% block content %}{% endblock %}
</div>
<script src="/static/jquery-3.5.1.min.js"></script>
<script src="/static/bootstrap.bundle.min.js"></script>
<!-- 更多的通用脚本和底部 -->
{% block scripts %}{% endblock %}
</body>
</html>
